<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
SysProperties
</title><link rel="stylesheet" type="text/css" href="../../../stylesheet.css" />
<script type="text/javascript" src="../../../animate.js"></script>
</head><body onload="openLink();">
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<h1>SysProperties</h1>
The constants defined in this class are initialized from system properties.
 Some system properties are per machine settings, and others are as a last
 resort and temporary solution to work around a problem in the application or
 database engine. Also, there are system properties to enable features that
 are not yet fully tested or that are not backward compatible.
 <p>
 System properties can be set when starting the virtual machine:
 </p>

 <pre>
 java -Dh2.baseDir=/temp</pre>

 They can be set within the application, but this must be done before loading
 any classes of this database (before loading the JDBC driver):

 <pre>
 System.setProperty(&quot;h2.baseDir&quot;, &quot;/temp&quot;);</pre><br /><br />
<table class="block"><tr onclick="return allDetails()"><th colspan="2">Methods</th></tr>
<tr id="__0" onclick="return on(0)">
<td class="return">static String</td><td class="method">
<a id="getScriptDirectory" href="#getScriptDirectory">getScriptDirectory</a>()
<div class="methodText">System property <code>h2.scriptDirectory</code> (default: empty
 string).</div>
</td></tr>
<tr onclick="return off(0)" class="detail" id="_0">
<td class="return">static String</td><td>
<a id="getScriptDirectory" href="#getScriptDirectory">getScriptDirectory</a>()
<div class="methodText">System property <code>h2.scriptDirectory</code> (default: empty
 string).<br />
 Relative or absolute directory where the script files are stored to or
 read from.</div>
<div class="itemTitle">Returns:</div>
<div class="item">the current value</div>
</td></tr>
</table>
<br /><table><tr><th colspan="2">Fields</th></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.allowedClasses">ALLOWED_CLASSES</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.bindAddress">BIND_ADDRESS</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.browser">BROWSER</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.check">CHECK</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.check2">CHECK2</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.clientTraceDirectory">CLIENT_TRACE_DIRECTORY</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.collatorCacheSize">COLLATOR_CACHE_SIZE</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.consoleStream">CONSOLE_STREAM</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.dataSourceTraceLevel">DATASOURCE_TRACE_LEVEL</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.delayWrongPasswordMax">DELAY_WRONG_PASSWORD_MAX</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.delayWrongPasswordMin">DELAY_WRONG_PASSWORD_MIN</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.enableAnonymousSSL">ENABLE_ANONYMOUS_SSL</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#file.encoding">FILE_ENCODING</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#file.separator">FILE_SEPARATOR</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.javaObjectSerializer">JAVA_OBJECT_SERIALIZER</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#java.specification.version">JAVA_SPECIFICATION_VERSION</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#line.separator">LINE_SEPARATOR</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.lobClientMaxSizeMemory">LOB_CLIENT_MAX_SIZE_MEMORY</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.lobFilesPerDirectory">LOB_FILES_PER_DIRECTORY</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.lobInDatabase">LOB_IN_DATABASE</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.maxFileRetry">MAX_FILE_RETRY</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.maxReconnect">MAX_RECONNECT</a>
</td></tr>
<tr><td class="return">static long</td><td class="method">
<a href="#h2.maxTraceDataLength">MAX_TRACE_DATA_LENGTH</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.modifyOnWrite">MODIFY_ON_WRITE</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.nioCleanerHack">NIO_CLEANER_HACK</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.nioLoadMapped">NIO_LOAD_MAPPED</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.objectCache">OBJECT_CACHE</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.objectCacheMaxPerElementSize">OBJECT_CACHE_MAX_PER_ELEMENT_SIZE</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.objectCacheSize">OBJECT_CACHE_SIZE</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.pgClientEncoding">PG_DEFAULT_CLIENT_ENCODING</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.prefixTempFile">PREFIX_TEMP_FILE</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.serverCachedObjects">SERVER_CACHED_OBJECTS</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.serverResultSetFetchSize">SERVER_RESULT_SET_FETCH_SIZE</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.socketConnectRetry">SOCKET_CONNECT_RETRY</a>
</td></tr>
<tr><td class="return">static int</td><td class="method">
<a href="#h2.socketConnectTimeout">SOCKET_CONNECT_TIMEOUT</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.sortNullsHigh">SORT_NULLS_HIGH</a>
</td></tr>
<tr><td class="return">static long</td><td class="method">
<a href="#h2.splitFileSizeShift">SPLIT_FILE_SIZE_SHIFT</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.storeLocalTime">STORE_LOCAL_TIME</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.syncMethod">SYNC_METHOD</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.traceIO">TRACE_IO</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#h2.urlMap">URL_MAP</a>
</td></tr>
<tr><td class="return">static String</td><td class="method">
<a href="#user.home">USER_HOME</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.useThreadContextClassLoader">USE_THREAD_CONTEXT_CLASS_LOADER</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.lobCloseBetweenReads">lobCloseBetweenReads</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.runFinalize">runFinalize</a>
</td></tr>
<tr><td class="return">static boolean</td><td class="method">
<a href="#h2.serializeJavaObject">serializeJavaObject</a>
</td></tr>
</table>
<h4 id="h2.allowedClasses"><span class="methodName">ALLOWED_CLASSES

</span></h4>
<div class="item">System property <code>h2.allowedClasses</code> (default: *).<br />
 Comma separated list of class names or prefixes.</div>
<hr />
<h4 id="h2.bindAddress"><span class="methodName">BIND_ADDRESS

</span></h4>
<div class="item">System property <code>h2.bindAddress</code> (default: null).<br />
 The bind address to use.</div>
<hr />
<h4 id="h2.browser"><span class="methodName">BROWSER

</span></h4>
<div class="item">System property <code>h2.browser</code> (default: null).<br />
 The preferred browser to use. If not set, the default browser is used.
 For Windows, to use the Internet Explorer, set this property to 'explorer'.
 For Mac OS, if the default browser is not Safari and you want to use Safari,
 use: <code>java -Dh2.browser="open,-a,Safari,%url" ...</code>.</div>
<hr />
<h4 id="h2.check"><span class="methodName">CHECK

</span></h4>
<div class="item">System property <code>h2.check</code> (default: true).<br />
 Assertions in the database engine.</div>
<hr />
<h4 id="h2.check2"><span class="methodName">CHECK2

</span></h4>
<div class="item">System property <code>h2.check2</code> (default: true).<br />
 Additional assertions in the database engine.</div>
<hr />
<h4 id="h2.clientTraceDirectory"><span class="methodName">CLIENT_TRACE_DIRECTORY

</span></h4>
<div class="item">System property <code>h2.clientTraceDirectory</code> (default:
 trace.db/).<br />
 Directory where the trace files of the JDBC client are stored (only for
 client / server).</div>
<hr />
<h4 id="h2.collatorCacheSize"><span class="methodName">COLLATOR_CACHE_SIZE

</span></h4>
<div class="item">System property <code>h2.collatorCacheSize</code> (default: 32000).<br />
 The cache size for collation keys (in elements). Used when a collator has
 been set for the database.</div>
<hr />
<h4 id="h2.consoleStream"><span class="methodName">CONSOLE_STREAM

</span></h4>
<div class="item">System property <code>h2.consoleStream</code> (default: true).<br />
 H2 Console: stream query results.</div>
<hr />
<h4 id="h2.dataSourceTraceLevel"><span class="methodName">DATASOURCE_TRACE_LEVEL

</span></h4>
<div class="item">System property <code>h2.dataSourceTraceLevel</code> (default: 1).<br />
 The trace level of the data source implementation. Default is 1 for
 error.</div>
<hr />
<h4 id="h2.delayWrongPasswordMax"><span class="methodName">DELAY_WRONG_PASSWORD_MAX

</span></h4>
<div class="item">System property <code>h2.delayWrongPasswordMax</code> (default: 4000).<br />
 The maximum delay in milliseconds before an exception is thrown for using
 the wrong user name or password. This slows down brute force attacks. The
 delay is reset after a successful login. The value 0 means there is no
 maximum delay.</div>
<hr />
<h4 id="h2.delayWrongPasswordMin"><span class="methodName">DELAY_WRONG_PASSWORD_MIN

</span></h4>
<div class="item">System property <code>h2.delayWrongPasswordMin</code> (default: 250).<br />
 The minimum delay in milliseconds before an exception is thrown for using
 the wrong user name or password. This slows down brute force attacks. The
 delay is reset to this value after a successful login. Unsuccessful
 logins will double the time until DELAY_WRONG_PASSWORD_MAX.
 To disable the delay, set this system property to 0.</div>
<hr />
<h4 id="h2.enableAnonymousSSL"><span class="methodName">ENABLE_ANONYMOUS_SSL

</span></h4>
<div class="item">System property <code>h2.enableAnonymousSSL</code> (default: true).<br />
 When using SSL connection, the anonymous cipher suite
 SSL_DH_anon_WITH_RC4_128_MD5 should be enabled.</div>
<hr />
<h4 id="file.encoding"><span class="methodName">FILE_ENCODING

</span></h4>
<div class="item">System property <code>file.encoding</code> (default: Cp1252).<br />
 It is usually set by the system and is the default encoding used for the
 RunScript and CSV tool.</div>
<hr />
<h4 id="file.separator"><span class="methodName">FILE_SEPARATOR

</span></h4>
<div class="item">System property <code>file.separator</code> (default: /).<br />
 It is usually set by the system, and used to build absolute file names.</div>
<hr />
<h4 id="h2.javaObjectSerializer"><span class="methodName">JAVA_OBJECT_SERIALIZER

</span></h4>
<div class="item">System property <code>h2.javaObjectSerializer</code> (default: null).<br />
 The JavaObjectSerializer class name for java objects being stored in
 column of type OTHER. It must be the same on client and server to work
 correctly.</div>
<hr />
<h4 id="java.specification.version"><span class="methodName">JAVA_SPECIFICATION_VERSION

</span></h4>
<div class="item">System property <code>java.specification.version</code>.<br />
 It is set by the system. Examples: 1.4, 1.5, 1.6.</div>
<hr />
<h4 id="line.separator"><span class="methodName">LINE_SEPARATOR

</span></h4>
<div class="item">System property <code>line.separator</code> (default: \n).<br />
 It is usually set by the system, and used by the script and trace tools.</div>
<hr />
<h4 id="h2.lobClientMaxSizeMemory"><span class="methodName">LOB_CLIENT_MAX_SIZE_MEMORY

</span></h4>
<div class="item">System property <code>h2.lobClientMaxSizeMemory</code> (default:
 1048576).<br />
 The maximum size of a LOB object to keep in memory on the client side
 when using the server mode.</div>
<hr />
<h4 id="h2.lobFilesPerDirectory"><span class="methodName">LOB_FILES_PER_DIRECTORY

</span></h4>
<div class="item">System property <code>h2.lobFilesPerDirectory</code> (default: 256).<br />
 Maximum number of LOB files per directory.</div>
<hr />
<h4 id="h2.lobInDatabase"><span class="methodName">LOB_IN_DATABASE

</span></h4>
<div class="item">System property <code>h2.lobInDatabase</code> (default: true).<br />
 Store LOB files in the database.</div>
<hr />
<h4 id="h2.maxFileRetry"><span class="methodName">MAX_FILE_RETRY

</span></h4>
<div class="item">System property <code>h2.maxFileRetry</code> (default: 16).<br />
 Number of times to retry file delete and rename. in Windows, files can't
 be deleted if they are open. Waiting a bit can help (sometimes the
 Windows Explorer opens the files for a short time) may help. Sometimes,
 running garbage collection may close files if the user forgot to call
 Connection.close() or InputStream.close().</div>
<hr />
<h4 id="h2.maxReconnect"><span class="methodName">MAX_RECONNECT

</span></h4>
<div class="item">System property <code>h2.maxReconnect</code> (default: 3).<br />
 The maximum number of tries to reconnect in a row.</div>
<hr />
<h4 id="h2.maxTraceDataLength"><span class="methodName">MAX_TRACE_DATA_LENGTH

</span></h4>
<div class="item">System property <code>h2.maxTraceDataLength</code> (default: 65535).<br />
 The maximum size of a LOB value that is written as data to the trace system.</div>
<hr />
<h4 id="h2.modifyOnWrite"><span class="methodName">MODIFY_ON_WRITE

</span></h4>
<div class="item">System property <code>h2.modifyOnWrite</code> (default: false).<br />
 Only modify the database file when recovery is necessary, or when writing
 to the database. If disabled, opening the database always writes to the
 file (except if the database is read-only). When enabled, the serialized
 file lock is faster.</div>
<hr />
<h4 id="h2.nioCleanerHack"><span class="methodName">NIO_CLEANER_HACK

</span></h4>
<div class="item">System property <code>h2.nioCleanerHack</code> (default: false).<br />
 If enabled, use the reflection hack to un-map the mapped file if
 possible. If disabled, System.gc() is called in a loop until the object
 is garbage collected. See also
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038</div>
<hr />
<h4 id="h2.nioLoadMapped"><span class="methodName">NIO_LOAD_MAPPED

</span></h4>
<div class="item">System property <code>h2.nioLoadMapped</code> (default: false).<br />
 If the mapped buffer should be loaded when the file is opened.
 This can improve performance.</div>
<hr />
<h4 id="h2.objectCache"><span class="methodName">OBJECT_CACHE

</span></h4>
<div class="item">System property <code>h2.objectCache</code> (default: true).<br />
 Cache commonly used values (numbers, strings). There is a shared cache
 for all values.</div>
<hr />
<h4 id="h2.objectCacheMaxPerElementSize"><span class="methodName">OBJECT_CACHE_MAX_PER_ELEMENT_SIZE

</span></h4>
<div class="item">System property <code>h2.objectCacheMaxPerElementSize</code> (default:
 4096).<br />
 The maximum size (precision) of an object in the cache.</div>
<hr />
<h4 id="h2.objectCacheSize"><span class="methodName">OBJECT_CACHE_SIZE

</span></h4>
<div class="item">System property <code>h2.objectCacheSize</code> (default: 1024).<br />
 The maximum number of objects in the cache.
 This value must be a power of 2.</div>
<hr />
<h4 id="h2.pgClientEncoding"><span class="methodName">PG_DEFAULT_CLIENT_ENCODING

</span></h4>
<div class="item">System property <code>h2.pgClientEncoding</code> (default: UTF-8).<br />
 Default client encoding for PG server. It is used if the client does not
 sends his encoding.</div>
<hr />
<h4 id="h2.prefixTempFile"><span class="methodName">PREFIX_TEMP_FILE

</span></h4>
<div class="item">System property <code>h2.prefixTempFile</code> (default: h2.temp).<br />
 The prefix for temporary files in the temp directory.</div>
<hr />
<h4 id="h2.serverCachedObjects"><span class="methodName">SERVER_CACHED_OBJECTS

</span></h4>
<div class="item">System property <code>h2.serverCachedObjects</code> (default: 64).<br />
 TCP Server: number of cached objects per session.</div>
<hr />
<h4 id="h2.serverResultSetFetchSize"><span class="methodName">SERVER_RESULT_SET_FETCH_SIZE

</span></h4>
<div class="item">System property <code>h2.serverResultSetFetchSize</code>
 (default: 100).<br />
 The default result set fetch size when using the server mode.</div>
<hr />
<h4 id="h2.socketConnectRetry"><span class="methodName">SOCKET_CONNECT_RETRY

</span></h4>
<div class="item">System property <code>h2.socketConnectRetry</code> (default: 16).<br />
 The number of times to retry opening a socket. Windows sometimes fails
 to open a socket, see bug
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6213296</div>
<hr />
<h4 id="h2.socketConnectTimeout"><span class="methodName">SOCKET_CONNECT_TIMEOUT

</span></h4>
<div class="item">System property <code>h2.socketConnectTimeout</code> (default: 2000).<br />
 The timeout in milliseconds to connect to a server.</div>
<hr />
<h4 id="h2.sortNullsHigh"><span class="methodName">SORT_NULLS_HIGH

</span></h4>
<div class="item">System property <code>h2.sortNullsHigh</code> (default: false).<br />
 Invert the default sorting behavior for NULL, such that NULL
 is at the end of a result set in an ascending sort and at
 the beginning of a result set in a descending sort.</div>
<hr />
<h4 id="h2.splitFileSizeShift"><span class="methodName">SPLIT_FILE_SIZE_SHIFT

</span></h4>
<div class="item">System property <code>h2.splitFileSizeShift</code> (default: 30).<br />
 The maximum file size of a split file is 1L &lt;&lt; x.</div>
<hr />
<h4 id="h2.storeLocalTime"><span class="methodName">STORE_LOCAL_TIME

</span></h4>
<div class="item">System property <code>h2.storeLocalTime</code> (default: false).<br />
 Store the local time. If disabled, the daylight saving offset is not
 taken into account.</div>
<hr />
<h4 id="h2.syncMethod"><span class="methodName">SYNC_METHOD

</span></h4>
<div class="item">System property <code>h2.syncMethod</code> (default: sync).<br />
 What method to call when closing the database, on checkpoint, and on
 CHECKPOINT SYNC. The following options are supported:
 "sync" (default): RandomAccessFile.getFD().sync();
 "force": RandomAccessFile.getChannel().force(true);
 "forceFalse": RandomAccessFile.getChannel().force(false);
 "": do not call a method (fast but there is a risk of data loss
 on power failure).</div>
<hr />
<h4 id="h2.traceIO"><span class="methodName">TRACE_IO

</span></h4>
<div class="item">System property <code>h2.traceIO</code> (default: false).<br />
 Trace all I/O operations.</div>
<hr />
<h4 id="h2.urlMap"><span class="methodName">URL_MAP

</span></h4>
<div class="item">System property <code>h2.urlMap</code> (default: null).<br />
 A properties file that contains a mapping between database URLs. New
 connections are written into the file. An empty value in the map means no
 redirection is used for the given URL.</div>
<hr />
<h4 id="user.home"><span class="methodName">USER_HOME

</span></h4>
<div class="item">System property <code>user.home</code> (empty string if not set).<br />
 It is usually set by the system, and used as a replacement for ~ in file
 names.</div>
<hr />
<h4 id="h2.useThreadContextClassLoader"><span class="methodName">USE_THREAD_CONTEXT_CLASS_LOADER

</span></h4>
<div class="item">System property <code>h2.useThreadContextClassLoader</code>
 (default: false).<br />
 Instead of using the default class loader when deserializing objects, the
 current thread-context class loader will be used.</div>
<hr />
<h4 id="h2.lobCloseBetweenReads"><span class="methodName">lobCloseBetweenReads

</span></h4>
<div class="item">System property <code>h2.lobCloseBetweenReads</code> (default: false).<br />
 Close LOB files between read operations.</div>
<hr />
<h4 id="h2.runFinalize"><span class="methodName">runFinalize

</span></h4>
<div class="item">System property <code>h2.runFinalize</code> (default: true).<br />
 Run finalizers to detect unclosed connections.</div>
<hr />
<h4 id="h2.serializeJavaObject"><span class="methodName">serializeJavaObject

</span></h4>
<div class="item">System property <code>h2.serializeJavaObject</code> (default: true).<br />
 <b>If true</b>, values of type OTHER will be stored in serialized form
 and have the semantics of binary data for all operations (such as sorting
 and conversion to string).
 <br />
 <b>If false</b>, the objects will be serialized only for I/O operations
 and a few other special cases (for example when someone tries to get the
 value in binary form or when comparing objects that are not comparable
 otherwise).
 <br />
 If the object implements the Comparable interface, the method compareTo
 will be used for sorting (but only if objects being compared have a
 common comparable super type). Otherwise the objects will be compared by
 type, and if they are the same by hashCode, and if the hash codes are
 equal, but objects are not, the serialized forms (the byte arrays) are
 compared.
 <br />
 The string representation of the values use the toString method of
 object.
 <br />
 In client-server mode, the server must have all required classes in the
 class path. On the client side, this setting is required to be disabled
 as well, to have correct string representation and display size.
 <br />
 In embedded mode, no data copying occurs, so the user has to make
 defensive copy himself before storing, or ensure that the value object is
 immutable.</div>
<hr />
</div></td></tr></table></body></html>
